package DEEPERsource.DEEPERsource.source.parser;

import jung.entities.Graph;

/**
 * Interface simplifies incorporation of of different parsers
 * @author tfayruzo
 *
 */
public interface Parser {
	
	/**
	 * 
	 * @param args - here could be some parser-specific 
	 * initialization parameters
	 */
	public void init(String... args);
	
	/**
	 * This method is supposed to be executed before get methods
	 * Otherwise, get methods will throw IllegalStateException 
	 * @param sentence
	 */
	public void parse(String sentence) throws Exception;
	
	public Graph getParseTree() throws IllegalStateException;
	public Graph getDependencyTree() throws IllegalStateException;
	
	/**
	 * Returned structured sentence should retain same indices
	 * for words as in graph structures
	 * @return
	 */
	public StructuredSentence getStructuredSentence() throws IllegalStateException;

}
